package com.lecture.java8.lambda;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class FilterTest {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("A","B","C","D");
        list = list.stream().filter(item -> item.equals("A")).collect(Collectors.toList());
        System.out.println(Arrays.toString(list.toArray()));
    }
}
